Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mutation on conj, adjoint #197

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Fix mutation on conj, adjoint #197

merged 1 commit into from
Sep 6, 2024

Conversation

mofeing
Copy link
Member

@mofeing mofeing commented Sep 6, 2024

conj (and thus adjoint because it calls conj) was mutating the arrays of the original TensorNetwork when it shouldn't.

The reason is that we were doing a shallow copy (i.e. copy) instead of a deep copy (i.e. deepcopy).

@mofeing mofeing merged commit 03d2627 into master Sep 6, 2024
6 checks passed
@mofeing mofeing deleted the fix/mutation-on-conj branch September 6, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant